const query = require('../utils/query');
const createTable = function(tb){
    query(tb,function(res){
        console.log('建表成功');
        return true;
    },function(err){
        console.log('建表失败',err);
        return false;
    })
};


const fs = require('fs');
fs.readdirSync(__dirname).forEach(file => {
    if (file === 'index.js') {
        return;
    }
    const tables = require(`./${file}`);
    if (tables) {
        createTable(tables);
    }
});